#pragma once

#include "ITask.h"

class CTask : public ITask
{
public:
	CTask();
	virtual ~CTask();

public:
	// Attribute
	virtual void        setName(std::string name);
	virtual std::string getName() const;

	virtual void        addLabel(std::string label);
	virtual void        setLabel(std::string label);
	virtual std::string getLabel()const;
	virtual int         deleteLabel(std::string label);

	virtual void        setImportance(int im);
	virtual int			getImportance()const;

	virtual void        setStartDate(IDate& date);
	virtual void        setEndDate(IDate& date);

    virtual ITask*      find(std::string name);
	virtual int         add(ITask* task);//
	virtual int         remove(ITask* task);

	virtual bool        operator==(ITask& t);

    virtual void		 setNext(ITask* task);
    virtual void		 setPre(ITask* task);
	virtual const ITask* getNext() const;
	virtual const ITask* getPre() const;
    virtual void         addRemarks(std::string remarks);
    virtual std::string  getRemarks() const;
    
    virtual void        setRemarks(std::string remarks);
    virtual ITask*      find(int index);
    virtual IDate*      getStartDate()const;
    virtual IDate*      getEndDate()const;


	virtual void          Rank();
	virtual void		  emerRank();
	virtual void		  imRank();
	virtual void          swap(ITask* t);
	virtual double		  emergency(ITask* t);

	ITask* m_pFirstTask;
	std::string m_strName;
	std::string m_strLabel;
	IDate* m_pStartDate;
	IDate* m_pEndDate;
	ITask* m_pPreTask;
	ITask* m_pNextTask;
	std::string  m_strRemarks;
	int importance;

};
